package com.design.quiet;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 静态代理服务
 */
public class ProxyOrderOrderService implements OrderService {
    private OrderService service;
    private SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
    public ProxyOrderOrderService(OrderService service){
        this.service = service;
    }

    @Override
    public void search() {
        System.out.println("开始执行方法:"+format.format(new Date()));
        service.search();
        System.out.println("方法执行结束:"+format.format(new Date()));
    }
}
